Skip to content

Conversation

@harisali45
Copy link

@harisali45 harisali45 commented Mar 21, 2017

In the notifications screen, to make a notification stick permanently, we enter 0 for timeout. But after entering 0 for timeout, the notification is shown and then removed immediately. This is because a string value is assigned to $scope.options.timeOut and timeouts are created for notifications when timeout value is truthy. Line#441 in angular-toastr.tpls.js :

scope.init = function() { 
         if (scope.options.timeOut) { 
          timeout = createTimeout(scope.options.timeOut);
        }

The value for timeOut and extendedTimeOut should be numeric. The number 0 is not truthy, but the string value "0" is truthy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant